\(\int \frac {\sec ^5(c+d x)}{a \cos (c+d x)+b \sin (c+d x)} \, dx\) [120]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [B] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 28, antiderivative size = 158 \[ \int \frac {\sec ^5(c+d x)}{a \cos (c+d x)+b \sin (c+d x)} \, dx=-\frac {\left (a^2+b^2\right )^2 \log (\cos (c+d x))}{b^5 d}+\frac {\left (a^2+b^2\right )^2 \log (a \cos (c+d x)+b \sin (c+d x))}{b^5 d}+\frac {\left (a^2+b^2\right ) \sec ^2(c+d x)}{2 b^3 d}+\frac {\sec ^4(c+d x)}{4 b d}-\frac {a \tan (c+d x)}{b^2 d}-\frac {a \left (a^2+b^2\right ) \tan (c+d x)}{b^4 d}-\frac {a \tan ^3(c+d x)}{3 b^2 d} \]

[Out]

-(a^2+b^2)^2*ln(cos(d*x+c))/b^5/d+(a^2+b^2)^2*ln(a*cos(d*x+c)+b*sin(d*x+c))/b^5/d+1/2*(a^2+b^2)*sec(d*x+c)^2/b
^3/d+1/4*sec(d*x+c)^4/b/d-a*tan(d*x+c)/b^2/d-a*(a^2+b^2)*tan(d*x+c)/b^4/d-1/3*a*tan(d*x+c)^3/b^2/d

Rubi [A] (verified)

Time = 0.25 (sec) , antiderivative size = 158, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.214, Rules used = {3183, 3852, 8, 3181, 3556, 3212} \[ \int \frac {\sec ^5(c+d x)}{a \cos (c+d x)+b \sin (c+d x)} \, dx=-\frac {\left (a^2+b^2\right )^2 \log (\cos (c+d x))}{b^5 d}+\frac {\left (a^2+b^2\right )^2 \log (a \cos (c+d x)+b \sin (c+d x))}{b^5 d}-\frac {a \left (a^2+b^2\right ) \tan (c+d x)}{b^4 d}+\frac {\left (a^2+b^2\right ) \sec ^2(c+d x)}{2 b^3 d}-\frac {a \tan ^3(c+d x)}{3 b^2 d}-\frac {a \tan (c+d x)}{b^2 d}+\frac {\sec ^4(c+d x)}{4 b d} \]

[In]

Int[Sec[c + d*x]^5/(a*Cos[c + d*x] + b*Sin[c + d*x]),x]

[Out]

-(((a^2 + b^2)^2*Log[Cos[c + d*x]])/(b^5*d)) + ((a^2 + b^2)^2*Log[a*Cos[c + d*x] + b*Sin[c + d*x]])/(b^5*d) +
((a^2 + b^2)*Sec[c + d*x]^2)/(2*b^3*d) + Sec[c + d*x]^4/(4*b*d) - (a*Tan[c + d*x])/(b^2*d) - (a*(a^2 + b^2)*Ta
n[c + d*x])/(b^4*d) - (a*Tan[c + d*x]^3)/(3*b^2*d)

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 3181

Int[1/(cos[(c_.) + (d_.)*(x_)]*(cos[(c_.) + (d_.)*(x_)]*(a_.) + (b_.)*sin[(c_.) + (d_.)*(x_)])), x_Symbol] :>
Dist[1/b, Int[Tan[c + d*x], x], x] + Dist[1/b, Int[(b*Cos[c + d*x] - a*Sin[c + d*x])/(a*Cos[c + d*x] + b*Sin[c
 + d*x]), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[a^2 + b^2, 0]

Rule 3183

Int[cos[(c_.) + (d_.)*(x_)]^(m_)/(cos[(c_.) + (d_.)*(x_)]*(a_.) + (b_.)*sin[(c_.) + (d_.)*(x_)]), x_Symbol] :>
 Simp[-Cos[c + d*x]^(m + 1)/(b*d*(m + 1)), x] + (-Dist[a/b^2, Int[Cos[c + d*x]^(m + 1), x], x] + Dist[(a^2 + b
^2)/b^2, Int[Cos[c + d*x]^(m + 2)/(a*Cos[c + d*x] + b*Sin[c + d*x]), x], x]) /; FreeQ[{a, b, c, d}, x] && NeQ[
a^2 + b^2, 0] && LtQ[m, -1]

Rule 3212

Int[((A_.) + cos[(d_.) + (e_.)*(x_)]*(B_.) + (C_.)*sin[(d_.) + (e_.)*(x_)])/((a_.) + cos[(d_.) + (e_.)*(x_)]*(
b_.) + (c_.)*sin[(d_.) + (e_.)*(x_)]), x_Symbol] :> Simp[(b*B + c*C)*(x/(b^2 + c^2)), x] + Simp[(c*B - b*C)*(L
og[a + b*Cos[d + e*x] + c*Sin[d + e*x]]/(e*(b^2 + c^2))), x] /; FreeQ[{a, b, c, d, e, A, B, C}, x] && NeQ[b^2
+ c^2, 0] && EqQ[A*(b^2 + c^2) - a*(b*B + c*C), 0]

Rule 3556

Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-Log[RemoveContent[Cos[c + d*x], x]]/d, x] /; FreeQ[{c, d}, x]

Rule 3852

Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Dist[-d^(-1), Subst[Int[ExpandIntegrand[(1 + x^2)^(n/2 - 1), x]
, x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]

Rubi steps \begin{align*} \text {integral}& = \frac {\sec ^4(c+d x)}{4 b d}-\frac {a \int \sec ^4(c+d x) \, dx}{b^2}+\frac {\left (a^2+b^2\right ) \int \frac {\sec ^3(c+d x)}{a \cos (c+d x)+b \sin (c+d x)} \, dx}{b^2} \\ & = \frac {\left (a^2+b^2\right ) \sec ^2(c+d x)}{2 b^3 d}+\frac {\sec ^4(c+d x)}{4 b d}-\frac {\left (a \left (a^2+b^2\right )\right ) \int \sec ^2(c+d x) \, dx}{b^4}+\frac {\left (a^2+b^2\right )^2 \int \frac {\sec (c+d x)}{a \cos (c+d x)+b \sin (c+d x)} \, dx}{b^4}+\frac {a \text {Subst}\left (\int \left (1+x^2\right ) \, dx,x,-\tan (c+d x)\right )}{b^2 d} \\ & = \frac {\left (a^2+b^2\right ) \sec ^2(c+d x)}{2 b^3 d}+\frac {\sec ^4(c+d x)}{4 b d}-\frac {a \tan (c+d x)}{b^2 d}-\frac {a \tan ^3(c+d x)}{3 b^2 d}+\frac {\left (a^2+b^2\right )^2 \int \frac {b \cos (c+d x)-a \sin (c+d x)}{a \cos (c+d x)+b \sin (c+d x)} \, dx}{b^5}+\frac {\left (a^2+b^2\right )^2 \int \tan (c+d x) \, dx}{b^5}+\frac {\left (a \left (a^2+b^2\right )\right ) \text {Subst}(\int 1 \, dx,x,-\tan (c+d x))}{b^4 d} \\ & = -\frac {\left (a^2+b^2\right )^2 \log (\cos (c+d x))}{b^5 d}+\frac {\left (a^2+b^2\right )^2 \log (a \cos (c+d x)+b \sin (c+d x))}{b^5 d}+\frac {\left (a^2+b^2\right ) \sec ^2(c+d x)}{2 b^3 d}+\frac {\sec ^4(c+d x)}{4 b d}-\frac {a \tan (c+d x)}{b^2 d}-\frac {a \left (a^2+b^2\right ) \tan (c+d x)}{b^4 d}-\frac {a \tan ^3(c+d x)}{3 b^2 d} \\ \end{align*}

Mathematica [A] (verified)

Time = 1.24 (sec) , antiderivative size = 99, normalized size of antiderivative = 0.63 \[ \int \frac {\sec ^5(c+d x)}{a \cos (c+d x)+b \sin (c+d x)} \, dx=\frac {12 \left (a^2+b^2\right )^2 \log (a+b \tan (c+d x))+3 b^4 \sec ^4(c+d x)-12 a b \left (a^2+2 b^2\right ) \tan (c+d x)+6 b^2 \left (a^2+b^2\right ) \tan ^2(c+d x)-4 a b^3 \tan ^3(c+d x)}{12 b^5 d} \]

[In]

Integrate[Sec[c + d*x]^5/(a*Cos[c + d*x] + b*Sin[c + d*x]),x]

[Out]

(12*(a^2 + b^2)^2*Log[a + b*Tan[c + d*x]] + 3*b^4*Sec[c + d*x]^4 - 12*a*b*(a^2 + 2*b^2)*Tan[c + d*x] + 6*b^2*(
a^2 + b^2)*Tan[c + d*x]^2 - 4*a*b^3*Tan[c + d*x]^3)/(12*b^5*d)

Maple [A] (verified)

Time = 1.13 (sec) , antiderivative size = 106, normalized size of antiderivative = 0.67

method result size
derivativedivides \(\frac {-\frac {-\frac {\tan \left (d x +c \right )^{4} b^{3}}{4}+\frac {a \tan \left (d x +c \right )^{3} b^{2}}{3}-\frac {\left (a^{2}+2 b^{2}\right ) \tan \left (d x +c \right )^{2} b}{2}+\tan \left (d x +c \right ) a \left (a^{2}+2 b^{2}\right )}{b^{4}}+\frac {\left (a^{4}+2 a^{2} b^{2}+b^{4}\right ) \ln \left (a +b \tan \left (d x +c \right )\right )}{b^{5}}}{d}\) \(106\)
default \(\frac {-\frac {-\frac {\tan \left (d x +c \right )^{4} b^{3}}{4}+\frac {a \tan \left (d x +c \right )^{3} b^{2}}{3}-\frac {\left (a^{2}+2 b^{2}\right ) \tan \left (d x +c \right )^{2} b}{2}+\tan \left (d x +c \right ) a \left (a^{2}+2 b^{2}\right )}{b^{4}}+\frac {\left (a^{4}+2 a^{2} b^{2}+b^{4}\right ) \ln \left (a +b \tan \left (d x +c \right )\right )}{b^{5}}}{d}\) \(106\)
parallelrisch \(\frac {48 \left (a^{2}+b^{2}\right )^{2} \left (\frac {3}{4}+\frac {\cos \left (4 d x +4 c \right )}{4}+\cos \left (2 d x +2 c \right )\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} a -2 b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-a \right )-48 \left (a^{2}+b^{2}\right )^{2} \left (\frac {3}{4}+\frac {\cos \left (4 d x +4 c \right )}{4}+\cos \left (2 d x +2 c \right )\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )-48 \left (a^{2}+b^{2}\right )^{2} \left (\frac {3}{4}+\frac {\cos \left (4 d x +4 c \right )}{4}+\cos \left (2 d x +2 c \right )\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )+\left (-6 a^{2} b^{2}-9 b^{4}\right ) \cos \left (4 d x +4 c \right )-12 b^{4} \cos \left (2 d x +2 c \right )+\left (-24 a^{3} b -56 a \,b^{3}\right ) \sin \left (2 d x +2 c \right )+\left (-12 a^{3} b -20 a \,b^{3}\right ) \sin \left (4 d x +4 c \right )+6 a^{2} b^{2}+21 b^{4}}{12 b^{5} d \left (3+\cos \left (4 d x +4 c \right )+4 \cos \left (2 d x +2 c \right )\right )}\) \(284\)
norman \(\frac {-\frac {2 \left (2 a^{2}+2 b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}}{b^{3} d}+\frac {2 \left (a^{2}+2 b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}{b^{3} d}+\frac {2 \left (a^{2}+2 b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}}{b^{3} d}-\frac {2 a \left (a^{2}+2 b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{b^{4} d}+\frac {2 a \left (a^{2}+2 b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{b^{4} d}+\frac {2 a \left (9 a^{2}+14 b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{3 d \,b^{4}}-\frac {2 a \left (9 a^{2}+14 b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{3 d \,b^{4}}}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right )^{4}}+\frac {\left (a^{4}+2 a^{2} b^{2}+b^{4}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} a -2 b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-a \right )}{b^{5} d}-\frac {\left (a^{4}+2 a^{2} b^{2}+b^{4}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{b^{5} d}-\frac {\left (a^{4}+2 a^{2} b^{2}+b^{4}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{b^{5} d}\) \(345\)
risch \(\frac {-2 i a^{3} {\mathrm e}^{6 i \left (d x +c \right )}-2 i a \,b^{2} {\mathrm e}^{6 i \left (d x +c \right )}+2 a^{2} b \,{\mathrm e}^{6 i \left (d x +c \right )}+2 b^{3} {\mathrm e}^{6 i \left (d x +c \right )}-6 i a^{3} {\mathrm e}^{4 i \left (d x +c \right )}-10 i a \,b^{2} {\mathrm e}^{4 i \left (d x +c \right )}+4 a^{2} b \,{\mathrm e}^{4 i \left (d x +c \right )}+8 b^{3} {\mathrm e}^{4 i \left (d x +c \right )}-6 i a^{3} {\mathrm e}^{2 i \left (d x +c \right )}-\frac {34 i a \,b^{2} {\mathrm e}^{2 i \left (d x +c \right )}}{3}+2 a^{2} b \,{\mathrm e}^{2 i \left (d x +c \right )}+2 b^{3} {\mathrm e}^{2 i \left (d x +c \right )}-2 i a^{3}-\frac {10 i a \,b^{2}}{3}}{b^{4} d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{4}}-\frac {\ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right ) a^{4}}{b^{5} d}-\frac {2 \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right ) a^{2}}{b^{3} d}-\frac {\ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}{b d}+\frac {\ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-\frac {i b +a}{i b -a}\right ) a^{4}}{b^{5} d}+\frac {2 \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-\frac {i b +a}{i b -a}\right ) a^{2}}{b^{3} d}+\frac {\ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-\frac {i b +a}{i b -a}\right )}{b d}\) \(398\)

[In]

int(sec(d*x+c)^5/(cos(d*x+c)*a+b*sin(d*x+c)),x,method=_RETURNVERBOSE)

[Out]

1/d*(-1/b^4*(-1/4*tan(d*x+c)^4*b^3+1/3*a*tan(d*x+c)^3*b^2-1/2*(a^2+2*b^2)*tan(d*x+c)^2*b+tan(d*x+c)*a*(a^2+2*b
^2))+(a^4+2*a^2*b^2+b^4)/b^5*ln(a+b*tan(d*x+c)))

Fricas [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 183, normalized size of antiderivative = 1.16 \[ \int \frac {\sec ^5(c+d x)}{a \cos (c+d x)+b \sin (c+d x)} \, dx=\frac {6 \, {\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} \cos \left (d x + c\right )^{4} \log \left (2 \, a b \cos \left (d x + c\right ) \sin \left (d x + c\right ) + {\left (a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{2} + b^{2}\right ) - 6 \, {\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} \cos \left (d x + c\right )^{4} \log \left (\cos \left (d x + c\right )^{2}\right ) + 3 \, b^{4} + 6 \, {\left (a^{2} b^{2} + b^{4}\right )} \cos \left (d x + c\right )^{2} - 4 \, {\left (a b^{3} \cos \left (d x + c\right ) + {\left (3 \, a^{3} b + 5 \, a b^{3}\right )} \cos \left (d x + c\right )^{3}\right )} \sin \left (d x + c\right )}{12 \, b^{5} d \cos \left (d x + c\right )^{4}} \]

[In]

integrate(sec(d*x+c)^5/(a*cos(d*x+c)+b*sin(d*x+c)),x, algorithm="fricas")

[Out]

1/12*(6*(a^4 + 2*a^2*b^2 + b^4)*cos(d*x + c)^4*log(2*a*b*cos(d*x + c)*sin(d*x + c) + (a^2 - b^2)*cos(d*x + c)^
2 + b^2) - 6*(a^4 + 2*a^2*b^2 + b^4)*cos(d*x + c)^4*log(cos(d*x + c)^2) + 3*b^4 + 6*(a^2*b^2 + b^4)*cos(d*x +
c)^2 - 4*(a*b^3*cos(d*x + c) + (3*a^3*b + 5*a*b^3)*cos(d*x + c)^3)*sin(d*x + c))/(b^5*d*cos(d*x + c)^4)

Sympy [F]

\[ \int \frac {\sec ^5(c+d x)}{a \cos (c+d x)+b \sin (c+d x)} \, dx=\int \frac {\sec ^{5}{\left (c + d x \right )}}{a \cos {\left (c + d x \right )} + b \sin {\left (c + d x \right )}}\, dx \]

[In]

integrate(sec(d*x+c)**5/(a*cos(d*x+c)+b*sin(d*x+c)),x)

[Out]

Integral(sec(c + d*x)**5/(a*cos(c + d*x) + b*sin(c + d*x)), x)

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 462 vs. \(2 (152) = 304\).

Time = 0.24 (sec) , antiderivative size = 462, normalized size of antiderivative = 2.92 \[ \int \frac {\sec ^5(c+d x)}{a \cos (c+d x)+b \sin (c+d x)} \, dx=-\frac {\frac {2 \, {\left (\frac {3 \, {\left (a^{3} + 2 \, a b^{2}\right )} \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {3 \, {\left (a^{2} b + 2 \, b^{3}\right )} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} - \frac {{\left (9 \, a^{3} + 14 \, a b^{2}\right )} \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {6 \, {\left (a^{2} b + b^{3}\right )} \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} + \frac {{\left (9 \, a^{3} + 14 \, a b^{2}\right )} \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}} - \frac {3 \, {\left (a^{2} b + 2 \, b^{3}\right )} \sin \left (d x + c\right )^{6}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{6}} - \frac {3 \, {\left (a^{3} + 2 \, a b^{2}\right )} \sin \left (d x + c\right )^{7}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{7}}\right )}}{b^{4} - \frac {4 \, b^{4} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {6 \, b^{4} \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} - \frac {4 \, b^{4} \sin \left (d x + c\right )^{6}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{6}} + \frac {b^{4} \sin \left (d x + c\right )^{8}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{8}}} - \frac {3 \, {\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} \log \left (-a - \frac {2 \, b \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {a \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}}\right )}{b^{5}} + \frac {3 \, {\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + 1\right )}{b^{5}} + \frac {3 \, {\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - 1\right )}{b^{5}}}{3 \, d} \]

[In]

integrate(sec(d*x+c)^5/(a*cos(d*x+c)+b*sin(d*x+c)),x, algorithm="maxima")

[Out]

-1/3*(2*(3*(a^3 + 2*a*b^2)*sin(d*x + c)/(cos(d*x + c) + 1) - 3*(a^2*b + 2*b^3)*sin(d*x + c)^2/(cos(d*x + c) +
1)^2 - (9*a^3 + 14*a*b^2)*sin(d*x + c)^3/(cos(d*x + c) + 1)^3 + 6*(a^2*b + b^3)*sin(d*x + c)^4/(cos(d*x + c) +
 1)^4 + (9*a^3 + 14*a*b^2)*sin(d*x + c)^5/(cos(d*x + c) + 1)^5 - 3*(a^2*b + 2*b^3)*sin(d*x + c)^6/(cos(d*x + c
) + 1)^6 - 3*(a^3 + 2*a*b^2)*sin(d*x + c)^7/(cos(d*x + c) + 1)^7)/(b^4 - 4*b^4*sin(d*x + c)^2/(cos(d*x + c) +
1)^2 + 6*b^4*sin(d*x + c)^4/(cos(d*x + c) + 1)^4 - 4*b^4*sin(d*x + c)^6/(cos(d*x + c) + 1)^6 + b^4*sin(d*x + c
)^8/(cos(d*x + c) + 1)^8) - 3*(a^4 + 2*a^2*b^2 + b^4)*log(-a - 2*b*sin(d*x + c)/(cos(d*x + c) + 1) + a*sin(d*x
 + c)^2/(cos(d*x + c) + 1)^2)/b^5 + 3*(a^4 + 2*a^2*b^2 + b^4)*log(sin(d*x + c)/(cos(d*x + c) + 1) + 1)/b^5 + 3
*(a^4 + 2*a^2*b^2 + b^4)*log(sin(d*x + c)/(cos(d*x + c) + 1) - 1)/b^5)/d

Giac [A] (verification not implemented)

none

Time = 0.34 (sec) , antiderivative size = 120, normalized size of antiderivative = 0.76 \[ \int \frac {\sec ^5(c+d x)}{a \cos (c+d x)+b \sin (c+d x)} \, dx=\frac {\frac {3 \, b^{3} \tan \left (d x + c\right )^{4} - 4 \, a b^{2} \tan \left (d x + c\right )^{3} + 6 \, a^{2} b \tan \left (d x + c\right )^{2} + 12 \, b^{3} \tan \left (d x + c\right )^{2} - 12 \, a^{3} \tan \left (d x + c\right ) - 24 \, a b^{2} \tan \left (d x + c\right )}{b^{4}} + \frac {12 \, {\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} \log \left ({\left | b \tan \left (d x + c\right ) + a \right |}\right )}{b^{5}}}{12 \, d} \]

[In]

integrate(sec(d*x+c)^5/(a*cos(d*x+c)+b*sin(d*x+c)),x, algorithm="giac")

[Out]

1/12*((3*b^3*tan(d*x + c)^4 - 4*a*b^2*tan(d*x + c)^3 + 6*a^2*b*tan(d*x + c)^2 + 12*b^3*tan(d*x + c)^2 - 12*a^3
*tan(d*x + c) - 24*a*b^2*tan(d*x + c))/b^4 + 12*(a^4 + 2*a^2*b^2 + b^4)*log(abs(b*tan(d*x + c) + a))/b^5)/d

Mupad [B] (verification not implemented)

Time = 25.69 (sec) , antiderivative size = 575, normalized size of antiderivative = 3.64 \[ \int \frac {\sec ^5(c+d x)}{a \cos (c+d x)+b \sin (c+d x)} \, dx=\frac {\left (6\,a^3\,b+12\,a\,b^3\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7+\left (6\,a^2\,b^2+12\,b^4\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+\left (-18\,a^3\,b-28\,a\,b^3\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+\left (-12\,a^2\,b^2-12\,b^4\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+\left (18\,a^3\,b+28\,a\,b^3\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+\left (6\,a^2\,b^2+12\,b^4\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+\left (-6\,a^3\,b-12\,a\,b^3\right )\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,\left (3\,b^5\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8-12\,b^5\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+18\,b^5\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-12\,b^5\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+3\,b^5\right )}-\frac {a^4\,\mathrm {atan}\left (\frac {b^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,1{}\mathrm {i}-b^2\,1{}\mathrm {i}+2{}\mathrm {i}\,a\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{-2\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+2\,a^2+2\,a\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-b^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+b^2}\right )\,2{}\mathrm {i}+b^4\,\mathrm {atan}\left (\frac {b^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,1{}\mathrm {i}-b^2\,1{}\mathrm {i}+2{}\mathrm {i}\,a\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{-2\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+2\,a^2+2\,a\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-b^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+b^2}\right )\,2{}\mathrm {i}+a^2\,b^2\,\mathrm {atan}\left (\frac {b^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,1{}\mathrm {i}-b^2\,1{}\mathrm {i}+2{}\mathrm {i}\,a\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{-2\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+2\,a^2+2\,a\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-b^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+b^2}\right )\,4{}\mathrm {i}}{b^5\,d} \]

[In]

int(1/(cos(c + d*x)^5*(a*cos(c + d*x) + b*sin(c + d*x))),x)

[Out]

(tan(c/2 + (d*x)/2)^2*(12*b^4 + 6*a^2*b^2) - tan(c/2 + (d*x)/2)*(12*a*b^3 + 6*a^3*b) + tan(c/2 + (d*x)/2)^6*(1
2*b^4 + 6*a^2*b^2) - tan(c/2 + (d*x)/2)^4*(12*b^4 + 12*a^2*b^2) + tan(c/2 + (d*x)/2)^7*(12*a*b^3 + 6*a^3*b) +
tan(c/2 + (d*x)/2)^3*(28*a*b^3 + 18*a^3*b) - tan(c/2 + (d*x)/2)^5*(28*a*b^3 + 18*a^3*b))/(d*(18*b^5*tan(c/2 +
(d*x)/2)^4 - 12*b^5*tan(c/2 + (d*x)/2)^2 - 12*b^5*tan(c/2 + (d*x)/2)^6 + 3*b^5*tan(c/2 + (d*x)/2)^8 + 3*b^5))
- (a^4*atan((b^2*tan(c/2 + (d*x)/2)^2*1i - b^2*1i + a*b*tan(c/2 + (d*x)/2)*2i)/(2*a^2 - b^2*tan(c/2 + (d*x)/2)
^2 - 2*a^2*tan(c/2 + (d*x)/2)^2 + b^2 + 2*a*b*tan(c/2 + (d*x)/2)))*2i + b^4*atan((b^2*tan(c/2 + (d*x)/2)^2*1i
- b^2*1i + a*b*tan(c/2 + (d*x)/2)*2i)/(2*a^2 - b^2*tan(c/2 + (d*x)/2)^2 - 2*a^2*tan(c/2 + (d*x)/2)^2 + b^2 + 2
*a*b*tan(c/2 + (d*x)/2)))*2i + a^2*b^2*atan((b^2*tan(c/2 + (d*x)/2)^2*1i - b^2*1i + a*b*tan(c/2 + (d*x)/2)*2i)
/(2*a^2 - b^2*tan(c/2 + (d*x)/2)^2 - 2*a^2*tan(c/2 + (d*x)/2)^2 + b^2 + 2*a*b*tan(c/2 + (d*x)/2)))*4i)/(b^5*d)